package com.jie.controller;

import com.jie.service.HelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author jie
 * @date 2019/8/7 -11:17
 */
@RestController
public class ConsumerController {

    @Resource
    HelloService helloService;

    @GetMapping("/feign-consumer")
    public String helloConsumer() {
        return helloService.hello();
    }

    @GetMapping("/feign-consumer2")
    public String helloConsumer2() {
        StringBuilder sb = new StringBuilder();
        sb.append(helloService.hello("jie")).append("\n");
        sb.append(helloService.info("jie", 18)).append("\n");
        return sb.toString();
    }
}
